{include file="index@mobile/head" /}
<div class="location"> <a href="/">首页</a> > <a href="{:u($entitle,'',1)}">{$columnName}</a> > 产品详情 </div>
<div class="swiper-container" id="product">
  <ul class="swiper-wrapper">
    {volist name="image" id="v"}
      <li class="swiper-slide"> <img src="{$v}" /> </li>
    {/volist}
  </ul>
  <div class="swiper-pagination"></div>
</div>
<div class="protop">
  <h2>{$one.title}</h2>
  <div class="note">
    <h3>产品优势</h3>
    {$one.note|htmlspecialchars_decode=###} </div>
  <p><a href="javascript:void(0);" class="showyy">产品订购</a></p>
</div>
<div class="h12"></div>

<ul class="cate c3">
  <li><a href="javascript:void(0);" class="on">产品详情</a></li>
  <li><a href="javascript:void(0);">产品参数</a></li>
</ul>
<div class="tabcon pdbox" style="display:block;"> {$one.content} </div>
<div class="tabcon pdbox"  style="display:none;"> {$one.content2} </div>


<!--提交手机 -->
<div class="mask2"></div>
<div class="yyphone">
 <a href="javascript:void(0);" class="close"></a><h2>产品订购</h2>
 <p><input type="text" class="intxt" id="name" maxlength="20" placeholder="请输入姓名" /></p>
 <p><input type="number" class="intxt" id="phone" maxlength="11" placeholder="输入手机号" /></p>
 <p><textarea class="intxt" id="content" maxlength="11" placeholder="请输入留言" ></textarea></p>
 <p><input type="button" value="提交" class="inbtn" onclick="yy()" /></p>
</div>
<script src="__PUBLIC__/public/layer/layer.js"></script>
<script> 
$(function(){
	$(".showyy").bind("click","li",function(){
		$(".mask2").fadeIn(300);
		$(".yyphone").addClass("open");
		$("#name").focus();
	})
	
	$(".yyphone .close").click(function(){
		$(".mask2").fadeOut(300);
		$(this).parent().removeClass("open");
		
	})
	
	$(".mask2").click(function(){
		$(".mask2").fadeOut(300);
		$(".yyphone").removeClass("open");
		$(".alertselect").removeClass("open");
	})
})


var swiper = new Swiper('#product', {
	pagination: '.swiper-pagination',
	slidesPerView: 1,
	paginationClickable: true,
	nextButton: '.next',
	prevButton: '.prev',
	autoplay:3500,
});

$(function(){
	$(".cate li").click(function(){
		var index =$(this).index();
		$(".cate li a").removeClass("on")
		$(this).find("a").addClass("on");
		$(".tabcon").hide().eq(index).show();
	})
})

function yy(){
	var name    = $("#name").val();	
	var phone   = $("#phone").val();	
	var content = $("#content").val();	
	if(name==""){
		layer.msg("请输入姓名");
		$("#name").focus();
		return false;
	}
	if(phone==""){
		layer.msg("请输入手机号");
		$("#phone").focus();
		return false;
	}
	var myreg = /^1[34578]\d{9}$/; 
	if(!myreg.test(phone)) {
		layer.msg("手机号码格式输入不正确");
		$("#phone").focus();
		return false;
	}
	if(content==""){
		layer.msg("请输入留言");
		$("#content").focus();
		return false;
	}
	$.post("{:url('Show/sendemail')}",{name:name,phone:phone,content:content},function(res){
		if(res.code==1){
			layer.msg('订购成功');
			setTimeout(function(){ window.location.reload(); },1500);
		}else{
			layer.msg(res.msg);
		}
	},"JSON")
}

</script> 
{include file="index@mobile/foot" /}